
			var canvas = document.getElementById("mycanvas");
			var pen = canvas.getContext("2d");
			var balls = []
			var time;
			canvas.width = document.documentElement.clientWidth;
			canvas.height = document.documentElement.clientHeight;
			pen.fillRect(0, 0, canvas.width, canvas.height);
			gettime();
			//			console.log(time.getTime())
			setInterval(function() {
				canvas.width = document.documentElement.clientWidth;
				canvas.height = document.documentElement.clientHeight;
				pen.clearRect(0, 0, canvas.width, canvas.height);
				pen.fillRect(0, 0, canvas.width, canvas.height);
				updatetime();
				gettime();
			}, 50)
			
			

			function gettime() {
				time = new Date();
				var hh = time.getHours();
				var mm = time.getMinutes();
				var ss = time.getSeconds();
				var timearr = [];
				timearr.push(parseInt(hh / 10));
				timearr.push(hh % 10);
				timearr.push(10);
				timearr.push(parseInt(mm / 10));
				timearr.push(mm % 10);
				timearr.push(10);
				timearr.push(parseInt(ss / 10));
				timearr.push(ss % 10);
				//				console.log(timearr)
				drawtime(timearr)
			}

			function updatetime() { //更新时间
				var date = new Date();
				var hh = date.getHours();
				var mm = date.getMinutes();
				var ss = date.getSeconds();
				//				console.log(date.getTime())
				if (ss != time.getSeconds()) { //时间发生变化
					//添加爆破小球
					if (ss % 10 != time.getSeconds() % 10) {
						addball(5*8*canvas.width/60+2*3*canvas.width/60, canvas.width/120, canvas.width/120, time.getSeconds() % 10)
					}
					if (parseInt(ss / 10) != parseInt(time.getSeconds() / 10)) {
						addball(4*8*canvas.width/60+2*3*canvas.width/60, canvas.width/120, canvas.width/120, parseInt(time.getSeconds() / 10))
					}
					if (mm % 10 != time.getMinutes() % 10) {
						addball(3*8*canvas.width/60+1*3*canvas.width/60, canvas.width/120, canvas.width/120, time.getMinutes() % 10)
					}
					if (parseInt(mm / 10) != parseInt(time.getMinutes() / 10)) {
						addball(2*8*canvas.width/60+1*3*canvas.width/60, canvas.width/120, canvas.width/120, parseInt(time.getMinutes() / 10))
					}
					if (hh % 10 != time.getHours() % 10) {
						addball(1*8*canvas.width/60, canvas.width/120, canvas.width/120, time.getHours() % 10)
					}
					if (parseInt(hh / 10) != parseInt(time.getHours() / 10)) {
						addball(0, canvas.width/120, canvas.width/120, parseInt(time.getHours() / 10))
					}
				}
				drawball();
			}

			function drawball() {
				var qp = 0;
				for (var i = 0; i < balls.length; i++) {
					pen.beginPath();
					pen.globalAlpha = 0.7;
					balls[i].x += balls[i].vx;
					balls[i].y += balls[i].vy;
					balls[i].vy += 9.8;
					if (balls[i].y > canvas.height - balls[i].r) {
						balls[i].y = canvas.height - balls[i].r;
						balls[i].vy = -0.7 * balls[i].vy;
					}
					pen.arc(balls[i].x, balls[i].y, balls[i].r, 0, 2 * Math.PI);
					pen.fillStyle = balls[i].color;
					pen.fill();
					if (balls[i].x > -balls[i].r && balls[i].x < canvas.width + balls[i].r) {
						balls[qp++] = balls[i];
					};
				}
				while (qp < balls.length) {
					balls.pop();
				}
			}

			function addball(x, y, r, num) {
				for (var i = 0; i < numbers[num].length; i++) {
					for (var j = 0; j < numbers[num][i].length; j++) {
						if (numbers[num][i][j] == 1) {
							balls.push(new Ball(x + j * 2 * r, y + i * 2 * r, r));
						}
					}
				}
			}

			function drawtime(timearr) {
				pen.fillStyle = "white";
				pen.globalAlpha = 1;
				for (var i = 0; i < timearr.length; i++) {
					drawnum(numbers[timearr[i]]);
					if (i == 2 || i == 5) {
						pen.translate(canvas.width/120*2*4, 0);
					} else if (i == 1 || i == 4) {
						pen.translate(canvas.width/120*2*7, 0);
					} else {
						pen.translate(canvas.width/120*2*8, 0);
					}
				}
			}

			function drawnum(arrname) {
				for (var i = 0; i < arrname.length; i++) {
					for (var j = 0; j < arrname[i].length; j++) {
						if (arrname[i][j] == 1) {
							pen.beginPath(); //							pen.fillStyle = "rgb(" + parseInt(Math.random() * 256) + "," + parseInt(Math.random() * 256) + "," + parseInt(Math.random() * 256) + ")"
							pen.arc(canvas.width/60 * j + canvas.width/120, canvas.width/60 * i + canvas.width/120, canvas.width/120, 0, 2 * Math.PI);
							pen.fill()
						}
					}
				}
			}

			function Ball(x, y, r) {
				this.x = x;
				this.y = y;
				this.r = r;
				var zy = Math.random() > 0.5 ? -1 : 1;
				this.vy = -1 * parseInt(Math.random() * (canvas.width/120)) * zy;
				zy = Math.random() > 0.5 ? -1 : 1;
				this.vx = zy * (parseInt(Math.random() * (canvas.width/120)) + 5);
				this.color = "rgb(" + parseInt(Math.random() * 256) + "," + parseInt(Math.random() * 256) + "," + parseInt(Math.random() * 256) + ")"
			}
